package ch05;

class ArrayEx06 {
	public static void main(String[] args) {
		int[] number = new int[10];
		int[] counter = new int[10];

		for (int i = 0; i < number.length; i++) 
			System.out.print(number[i] = (int) (Math.random() * 10));
		System.out.println();

		for (int i = 0; i < number.length; i++) 
			counter[number[i]]++;

		for (int i = 0; i < number.length; i++) 
			System.out.println(i + ":" + counter[i]);
	}
}
/*
3030730847
0:3
1:0
2:0
3:3
4:1
5:0
6:0
7:2
8:1
9:0
*/